package com.bskj.bms.service;

import java.util.List;
import java.util.Map;

import com.bskj.bms.bean.req.UserListReqVo;
import com.bskj.bms.bean.vo.AllInfoUserVo;
import com.bskj.common.bean.model.BmsUser;
import com.bskj.common.dao.core.Page;
import com.bskj.common.enums.BmsUserTypeEnum;
import com.bskj.common.service.IBaseService;

public interface IBmsUserService  extends IBaseService<BmsUser> {
	/**
	 * 根据 用户名密码找用户
	 * @param username
	 * @param password
	 * @return
	 * @throws Exception
	 */
	BmsUser findUser(String username,String password)throws Exception;
	
	/**
	 * 加载用户角色权限相关的东西
	 * 
	 * @param bmsUser
	 * @return
	 * @throws Exception
	 */
	Map<String,Object> loadBmsUserRoleResource(BmsUser bmsUser)throws Exception;
	
	/**
	 * 查询用户数据
	 * 
	 * @param req
	 * @return
	 * @throws Exception
	 */
	Page<AllInfoUserVo> pageUser(UserListReqVo req)throws Exception;
	
	/**
	 * 加载用户全部信息
	 * 
	 * @param userId
	 * @return
	 * @throws Exception
	 */
	AllInfoUserVo getAllInfoUser(Integer userId) throws Exception;
	
	/**
	 * 加载用户全部信息
	 * 
	 * @param bmsUser
	 * @return
	 * @throws Exception
	 */
	AllInfoUserVo getAllInfoUser(BmsUser bmsUser) throws Exception;
	
	/**
	 * 展示可以看选的用户类型
	 * 
	 * @param type
	 * @return
	 * @throws Exception
	 */
	List<BmsUserTypeEnum> listShowUserType(int type)throws Exception;
}
